class ParamResoult < ActiveRecord::Base
  belongs_to :param_norm
  belongs_to :temp_examination_resoult
  belongs_to :examination_resoult

  def to_label
    "Wynik Parametru #{ParamNorm.find(param_norm_id).name} wynosi #{self.resoult}"
  end

  validates_numericality_of :resoult

  class << self
    HUMANIZED_ATTRIBUTE_KEY_NAMES = {
            "resoult" => "pole wynik",
            }

    def human_attribute_name(attribute_key_name)
      HUMANIZED_ATTRIBUTE_KEY_NAMES[attribute_key_name] || super
    end
  end
end
